Copyright(C) 1994 Terumasa KODAKA , Takeshi KONO ■ Calling MS-DOS extended functions The table below shows a list of MS-DOS products for the PC-9800. Table MS-DOS list for PC-9800 -------------+---------+------------------------------------- Product name | MS-DOS |Compatible models | Version | -------------+---------+------------------------------------- PS98-111 | 1.25 | Normal only PS98-121 | 2.0 | Normal only PS98-122 | 2.0 | Normal only PS98-123 | 2.0 | Normal only PS98-XA121 | 2.0 | High-resolution only(*1) PS98-XL121 | 2.0 | High-resolution only(*1) PS98-125 | 3.1 | Normal only PS98-127 | 3.1 | Normal only PS98-129 | 3.1 | Normal only PS98-XA125 | 3.1 | High-resolution only PS98-XL125 | 3.1 | For high-resolution audio only (*1) PS98-LT125 | 3.1 | Built-in PC-98LT PS98-HA125 | 3.1 | Built-in PC-98HA PS98-011 | 3.1 | For both normal and high-resolution audio PS98-013 | 3.3 | For both normal and high-resolution audio PS98-015 | 3.3A | For both normal and high-resolution audio PS98-017 | 3.3B | For both normal and high-resolution audio PS98-H1001-x1| 3.3B | For both normal and high-resolution audio, for PC-H98 only (*1) PS98-019 | 3.3C | For both normal and high-resolution audio PS98-H1001-x2| 3.3C | For both normal and high-resolution audio, for PC-H98 only (*1) PS98-1002-x2 | 3.3D | For both normal and high-resolution audio, compatible with PC-H98 | 3.3D-R | Built-in PC-9801NL (*2) PS98-1003-x1 | 5.0 | For both normal and high-resolution audio, compatible with PC-H98 PS98-1003-x2 | 5.0A | For both normal and high-resolution audio, compatible with PC-H98 | 5.0A-H | Installed version for hard disk model (*2,*3) | 5.0A-H | 1.44MB FDD-compatible version (*2) -------------+---------+------------------------------------- *1: No analysis has been performed on versions marked with this symbol. *2: Unless otherwise noted, same as 3.3D, 5.0A. *3: The version included with the hard disk model of the PC-9801NA does not support 1.44MB. INT DCh - Function 00-08h Classification Extended MS-DOS Name No function Target MS-DOS 1.25 (PS98-111): IO.SYS MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.1 (PC-98LT HA): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 00-08h Output No change in register Explanation o No function Related INT DCh - Function 09h Subfunction 0000h Classification Extended MS-DOS Name Get SCSI device type Undocumented Target MS-DOS 3.3D: IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 09h AX = 0000h DS:DX = Buffer address (buffer size 8 bytes) Output No change in register Buffer contents --------+------------------------------------- Offset | Contents --------+------------------------------------- +00h | Device type value for SCSI ID 0 +01h | Device type value for SCSI ID 1 +02h | Device type value for SCSI ID 2 +03h | Device type value for SCSI ID 3 +04h | Device type value for SCSI ID 4 +05h | Device type value for SCSI ID 5 +06h | Device type value for SCSI ID 6 +07h | Device type value for SCSI ID 7 --------+------------------------------------- ------------------+----------------------------- Device type value | Meaning ------------------+----------------------------- 00h | Hard disk 01h | Tape unit 05h | CD-ROM 07h | 3.5"MO 84h | 5"MO FFh | No Device ------------------+----------------------------- Explanation o Writes a list of device type values (values that indicate the type of device) of connected SCSI devices to the memory specified by DS:DX. The device type value is, more precisely, the first byte of data obtained by the standard SCSI INQUIRY command (bits 7-5 are Peripheral Qualifier, bits 4-0 are Peripheral Device Type). o MS-DOS checks for connected SCSI devices at startup and saves that information in the work area. This function simply copies the information in the work area to the address specified by DS:DX. For this reason, SCSI devices that were not powered on when MS-DOS started will be marked as "No Device". u When MS-DOS checks for SCSI device connections at startup, it does so in the order of ID numbers 0, 1, 2, ..., 7. If there is an ID number with no device connected along the way, it does not check any further. Any work area that corresponds to an ID number after that will be in the "no device" state. This is a measure to prevent the startup time of MS-DOS from being long, since it takes time to check the connection of an ID number that is not connected to a device. However, hard disks are an exception, and are always correctly recognized even if they are not present in consecutive ID values starting from 0. The connection status of the hard disk is set to 0000:0482h by the BIOS, so MS-DOS references this to set the work area, so that it does not affect the startup time of MS-DOS. o Even in MS-DOS 3.3D, if a 3.5" MO is connected, the value "07h" is obtained. However, it is not recognized as an MS-DOS drive. Related 0000:0460h ■MS-DOS 3.3D 0060:1D3B-1D42h ■MS-DOS 5.0, 5.0A 0060:1DBB-1DC2h INT DCh - Function 09h Subfunction 0001h Classification Extended MS-DOS Name Unknown Undocumented Target MS-DOS 3.3D: IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=09h AX=0001h DL=SCSI ID of MO drive (not DA/UA) Output AX=Return code 0000h MO drive specified FFFFh Specified SCSI ID is not MO Explanation o Details unknown. If the SCSI ID specified in DL is an MO drive, the program ends normally, otherwise it ends abnormally. o It references the area that stores information about the MO, and writes a constant to part of that area, but the meaning of this operation is unknown. o MS-DOS 3.3D only supports 5" MO. It does not recognize 3.5" MO. u MS-DOS 3.3D does not return an abnormal end return code. In case of abnormal termination, it will return with AX=0001h. Related ■MS-DOS 3.3D 0060:9178-9197h ■MS-DOS 5.0, 5.0A 0060:026A-02A9h INT DCh - Function 09h Subfunction 0010h,0011h Category Extended MS-DOS Name MO drive eject lock/unlock Undocumented Target MS-DOS 5.0, 5.0A:IO.SYS Input CL=09h AX=Subfunction number (operation specification) 0010h Eject lock 0011h Eject unlock DL=MO drive DA/UA (not SCSI ID) Output AX=Return code 0000h Normal end Eject lock counter incremented/decremented 0001h Eject not locked (Subfunction 0011h only) 0002h Failed to eject lock/unlock 0003h Failed to eject lock/unlock FFFFh The specified DA/UA is not MO Explanation o Performs eject lock/unlock for the specified MO drive. o A counter indicating the number of locks is incremented each time "eject lock" is executed, and the same counter is decremented each time "eject unlock" is executed. When the counter reaches 0 during decrement, the eject lock is released. o The number of locks is managed for each drive. o Executing "eject lock" immediately after inserting MO media into the drive will not end normally. It will end normally if the MO is accessed or this function is executed several times. o If there is an abnormality in the MO drive when the eject lock is actually released, the return code will be 0002h or 0003h. o It will not end normally if no MO media is inserted. o The difference between the return codes 0002h and 0003h is unknown. Related 0060:03E9h INT DCh - Function 0Ah (Normal) Classification Extended MS-DOS Name Initialization of RS-232C port Undocumented Target Normal MS-DOS 1.25 (PS98-111): IO.SYS MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.1 (PC-98LT HA): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 0Ah Output ■ [MS-DOS 3.1 (PS98-011), 3.3 (all), 5.0, 5.0A] AX = Return code 0000: Normal termination No change: RSDRV.SYS is not included ■ [MS-DOS 1.25, 2.0 (all), 3.1 (PS98-125, 127, 129)] No change in register Explanation o Initializes the hardware and work area for RS-232C channel 0. After this, input and output using the AUX device becomes possible. o Communication parameters follow the contents of 0060:0068h (WORD). The contents of memory switches 1 and 2 are copied to these two bytes at startup. In addition, when parameters are changed with the SPEED command, the settings are also reflected. o A 256-byte receive buffer is allocated. u In the MS-DOS Programmer's Reference Manual for PS98-011 and later, this function is listed as a high-resolution only function, but it also exists in normal mode. However, the input is different from that in high-resolution mode. In MS-DOS 3.1 (PS98-011) and later, INT DCh - Function 0Eh is available, which can be used in both normal and high-resolution modes, so this function is only retained for compatibility. u In MS-DOS versions from PS98-127 onwards, the RS-232C driver is independent of IO.SYS. In this case, this function will be inoperative if RSDRV.SYS is not installed. In PS98-127 and 129, it is not possible to determine whether RSDRV.SYS is installed from the result of executing this function. You can determine whether RSDRV.SYS is installed by checking 0060:1802h (if it is 0000h, it is not installed). However, in systems where the RS-232C driver is installed in IO.SYS, this address is always 0000h, so the MS-DOS version must be determined. u The main processing is as follows. INT 19h - Executes Function 00h (RSDRV). In products after PS98-011, a process is included that returns a return code of 0000h or FFFFh according to the value of the AH register after executing INT 19h. However, since INT 19h - Function 00h (RSDRV) always ends normally, a return code of FFFFh is never returned. u In MS-DOS 1.25, the address of the work area is different. u In some versions of MS-DOS 5.0A (such as the version that came with the PC-9821Af・Ne and PC-9801NX/C・P), the RS-232C interrupt (INT 0Ch) may remain masked by the interrupt controller even if SPEED.EXE is executed. This does not happen if this function is executed directly. Related INT DCh - Function 0Eh Subfunction 00h (Normal) 0060:0068h 0060:1802h INT DCh - Function 0Ah (Hi-Res) Classification Extended MS-DOS Name Initialize RS-232C port Target Hi-Res MS-DOS 2.0 (PS98-XA121/XL121): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Ah DH=Communication parameter specification bit 7,6:Stop bit length 11b=2 bits 10b=1.5 bits 01b=1 bit bit 5 :Parity specification 1=Even 0=Odd bit 4 :Parity presence/absence 1=Yes 0=No bit 3,2:Data bit length 11b=8 bits 10b=7 bits 01b=6 bits 00b=5 bits bit 1: Specify 0 bit 0: X flow control 1=Yes 0=No DL=Channel number, communication speed bit 7-4: Channel number 0010b = Channel 2 (RS-232C extension line) 0001b = Channel 1 (RS-232C extension line) 0000b = Channel 0 (built-in RS-232C) bit 3-0: Communication speed 1001b = 19200bps■Only for devices that support 19200bps 1000b = 9600bps 0111b = 4800bps 0110b = 2400bps 0101b = 1200bps 0100b = 600bps 0011b = 300bps 0010b = 150bps 0001b = 75bps 0000b = Invalid * Communication speed can only be specified for channel 0. Setting any other value will result in 1200bps AH=same value as DL■[PS98-011 and later] * Must be set to the same value as DL Output AX=return code 0000h Initialization complete FFFFh Attempted to initialize channels 1 and 2 without an RS-232C expansion interface board No change RSDRV.SYS not built-in Explanation o Initializes the RS-232C port hardware and work area. After this, input and output using the AUX, AUX1, and AUX2 devices becomes possible. o A 256-byte receive buffer is allocated. o Input is different from normal mode. u For MS-DOS PS98-011 and later, AH must be set to the same value as DL before execution. This is because a copy from DL to AH is not performed at the beginning of this function's processing. o In systems where the RS-232C driver (RSDRV.SYS) is separate from IO.SYS, this function will not work unless RSDRV.SYS is installed (AX will not change). The processing routine itself is in IO.SYS. Initialization is performed using INT 19h - Function 00h (BIOS). u To determine whether the device supports 19200bps, refer to FFE8:0002h. If the device supports 19200bps, 19200bps can be used in the BIOS even in the high-resolution mode of the 98 high-resolution board (PC-9821A-E02). Related INT DCh - Function 0Eh Subfunction 00h (high-resolution) 0060:0068h 0060:1802h FFE8:0002h bit 2 INT DCh - Function 0Bh Classification Extended MS-DOS Name No function Undocumented Applicable to MS-DOS 1.25 (PS98-111): IO.SYS MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.1 (PC-98LT HA): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 0Bh Output No change in registers Explanation o Returns without doing anything. Related INT DCh - Function 0Ch Subfunction 0000-00FFh Classification Extended MS-DOS Name Get key (get programmable key settings) Target MS-DOS 1.25 (PS98-111): IO.SYS MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.1 (PC-98LT/HA): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Ch AX=Subfunction number (key value) DS:DX=Data buffer address Output No change in register Explanation o Writes the key setting data set for programmable keys such as function keys and arrow keys to the memory specified by DS:DX. o For the subfunction numbers (key specification values), see [List of key specification values and corresponding keys]. For the buffer structure and buffer size, see table [Buffer structure of programmable key setting data]. o The range of supported subfunctions (key specifications) varies depending on the MS-DOS version. For the support range, see table [Subfunction support range for each MS-DOS version]. Related INT DCh - Function 0Dh Table [List of key specification values and corresponding keys] ------------------------+--------------------------------------------------- Key specification value | Corresponding key ------------------------+--------------------------------------------------- 0000h | [f・1] to [f・10], [SHIFT] + [f・1] to [SHIFT] + [f・10], | [ROLL UP], [ROLL DOWN], [INS], [DEL], [↑], [←], [→], [↓], | [HOME/CLR], [HELP], [SHIFT] + [HOME/CLR] 0001 to 000Ah | [f・1] to [f・10] 000B to 0014h | [SHIFT] + [f・1] to [SHIFT] + [f・10] 0015h | [ROLL UP] 0016h | [ROLL DOWN] 0017h | [INS] 0018h | [DEL] 0019h | [↑] 001Ah | [←] 001Bh | [→] 001Ch | [↓] 001Dh | [HOME/CLR](XA keyboard:[CLR]) 001Eh | [HELP] 001Fh | [SHIFT]+[HOME/CLR](XA keyboard:[HOME]) 0020-0024h | [vf・1]-[vf・5] 0025-0029h | [SHIFT]+[vf・1]-[vf・5] 002A-0033h | [CTRL]+[f・1]-[f・10] 0034-0038h | [CTRL]+[vf・1]-[vf・5] 0039h | [CTRL]+[XFER]/[NFER] (Undocumented) 003Ah | [CTRL]+[XFER]/[NFER],[CTRL]+[f・1]~[f・10] | (Undocumented) 00FFh | [f・1]〜[f・10],[vf・1]〜[vf・5], | [SHIFT]+[f・1]〜[SHIFT]+[f・10],[SHIFT]+[vf・1]〜[vf・5], | [ROLL UP],[ROLL DOWN],[INS],[DEL],[↑],[←],[→],[↓], | [HOME/CLR],[HELP],[SHIFT]+[HOME/CLR], | [CTRL]+[f・1] to [f・10], [CTRL]+[vf・1] to [vf・5] ------------------------+--------------------------------------------------- Table [Supported range of key specification values for each MS-DOS version] ------------------------+---+---+---+---+---+---+---+---+-----+ Key specification value | MS-DOS version (PS98-XXX) |111|121|122|123|125|127|129|011|XA125 ------------------------+---+---+---+---+---+---+---+---+-----+ 0000 to 001Fh | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ | ○ 0020 to 0029h | × | × | × | × | × | × | × | ○ | ○ 002A-0033h | × | × | × | × | ○ | ○ | ○ | ○ | △ 0034-0038h | × | × | × | × | × | × | × | ○ | △ 0039h | × | × | × | × | × | ○ | ○ | ○ | × 003Ah | × | × | × | × | ○ | ○ | ○ | ○ | × 00FFh | × | × | × | × | × | × | × | ○ | ○ ------------------------+---+---+---+---+---+---+---+---+-----+ * PC-98LT/HA is the same as PS98-127. * MS-DOS 3.3(all), 5.0, 5.0A is the same as PS98-011. * For the PS98-XA125 triangle mark, the keys are as follows. Key values 002B to 0033h specify [CTRL]+[f・1] to [f・9]. Key values 0035 to 0038h specify [CTRL]+[vf・1] to [vf・4]. Table [Programmable key setting data buffer structure] (1) Key specification value 0000h -------+--------------------+-------------------------------------- Offset | Key type | Size of key setting data -------+--------------------+-------------------------------------- +0000h | [f・1] | 16 bytes (15 bytes of key setting data + 00h) +0010h | [f・2] | 16 bytes (15 bytes of key setting data + 00h) +0020h | [f・3] | 16 bytes (15 bytes of key setting data + 00h) +0030h | [f・4] | 16 bytes (15 bytes of key setting data + 00h) +0040h | [f・5] | 16 bytes (15 bytes of key setting data + 00h) +0050h | [f・6] | 16 bytes (15 bytes of key setting data + 00h) +0060h | [f・7] | 16 bytes (15 bytes of key setting data + 00h) +0070h | [f・8] | 16 bytes (15 bytes of key setting data + 00h) +0080h | [f・9] | 16 bytes (15 bytes of key setting data + 00h) +0090h | [f・10] | 16 bytes (15 bytes of key setting data + 00h) +00A0h | [SHIFT]+[f・1] | 16 bytes (15 bytes of key setting data + 00h) +00B0h | [SHIFT]+[f・2] | 16 bytes (15 bytes of key setting data + 00h) +00C0h | [SHIFT]+[f・3] | 16 bytes (15 bytes of key setting data + 00h) +00D0h | [SHIFT]+[f・4] | 16 bytes (15 bytes of key setting data + 00h) +00E0h | [SHIFT]+[f・5] | 16 bytes (15 bytes of key setting data + 00h) +00F0h | [SHIFT]+[f・6] | 16 bytes (15 bytes of key setting data + 00h) +0100h | [SHIFT]+[f・7] | 16 bytes (15 bytes of key setting data + 00h) +0110h | [SHIFT]+[f・8] | 16 bytes (15 bytes of key setting data + 00h) +0120h | [SHIFT]+[f・9] | 16 bytes (15 bytes of key setting data + 00h) +0130h | [SHIFT]+[f・10] | 16 bytes (15 bytes of key setting data + 00h) +0140h | [ROLL UP] | 6 bytes (5 bytes of key setting data + 00h) +0146h | [ROLL DOWN] | 6 bytes (5 bytes of key setting data + 00h) +014Ch | [INS] | 6 bytes (5 bytes of key setting data + 00h) +0152h | [DEL] | 6 bytes (5 bytes of key setting data + 00h) +0158h | [↑] | 6 bytes (5 bytes of key setting data + 00h) +015Eh | [←] | 6 bytes (5 bytes of key setting data + 00h) +0164h | [→] | 6 bytes (5 bytes of key setting data + 00h) +016Ah | [↓] | 6 bytes (5 bytes of key setting data + 00h) +0170h | [HOME/CLR] | 6 bytes (5 bytes of key setting data + 00h) +0176h | [HELP] | 6 bytes (5 bytes of key setting data + 00h) +017Ch | [SHIFT]+[HOME/CLR] | 6 bytes (5 bytes of key setting data + 00h) -------+--------------------+-------------------------------------- (2) Key specification value 0001-0014h, 0020-0039h -------+-------------------------------------- Offset | Size of key setting data -------+-------------------------------------- +0000h | 16 bytes (15 bytes of key setting data + 00h) -------+-------------------------------------- (3) Key specification value 0015-001Fh -------+------------------------------------ Offset | Size of key setting data -------+------------------------------------ +0000h | 6 bytes (5 bytes of key setting data + 00h) -------+------------------------------------ (4) Key specification value 003Ah -------+----------------------+-------------------------------------- Offset | Key type | Size of key setting data -------+----------------------+-------------------------------------- +0000h | [CTRL]+[XFER]/[NFER] | 16 bytes (15 bytes of key setting data + 00h) +0010h | [CTRL]+[f・1] | 16 bytes (15 bytes of key setting data + 00h) +0020h | [CTRL]+[f・2] | 16 bytes (15 bytes of key setting data + 00h) +0030h | [CTRL]+[f・3] | 16 bytes (15 bytes of key setting data + 00h) +0040h | [CTRL]+[f・4] | 16 bytes (15 bytes of key setting data + 00h) +0050h | [CTRL]+[f・5] | 16 bytes (15 bytes of key setting data + 00h) +0060h | [CTRL]+[f・6] | 16 bytes (15 bytes of key setting data + 00h) +0070h | [CTRL]+[f・7] | 16 bytes (15 bytes of key setting data +00h) +0080h | [CTRL]+[f・8] | 16 bytes (15 bytes of key setting data +00h) +0090h | [CTRL]+[f・9] | 16 bytes (15 bytes of key setting data +00h) +00A0h | [CTRL]+[f・10] | 16 bytes (15 bytes of key setting data +00h) -------+----------------------+-------------------------------------- (5) Key specification value 00FFh -------+----------------------+-------------------------------------- Offset | Key type | Size of key setting data -------+----------------------+-------------------------------------- +0000h | [f・1] | 16 bytes (15 bytes of key setting data + 00h) +0010h | [f・2] | 16 bytes (15 bytes of key setting data + 00h) +0020h | [f・3] | 16 bytes (15 bytes of key setting data + 00h) +0030h | [f・4] | 16 bytes (15 bytes of key setting data + 00h) +0040h | [f・5] | 16 bytes (15 bytes of key setting data + 00h) +0050h | [f・6] | 16 bytes (15 bytes of key setting data + 00h) +0060h | [f・7] | 16 bytes (15 bytes of key setting data + 00h) +0070h | [f・8] | 16 bytes (15 bytes of key setting data + 00h) +0080h | [f・9] | 16 bytes (15 bytes of key setting data + 00h) +0090h | [f・10] | 16 bytes (15 bytes of key setting data + 00h) +00A0h | [vf・1] | 16 bytes (15 bytes of key setting data + 00h) +00B0h | [vf・2] | 16 bytes (15 bytes of key setting data + 00h) +00C0h | [vf・3] | 16 bytes (15 bytes of key setting data + 00h) +00D0h | [vf・4] | 16 bytes (15 bytes of key setting data + 00h) +00E0h | [vf・5] | 16 bytes (15 bytes of key setting data + 00h) +00F0h | [SHIFT]+[f・1] | 16 bytes (15 bytes of key setting data + 00h) +0100h | [SHIFT]+[f・2] | 16 bytes (15 bytes of key setting data + 00h) +0110h | [SHIFT]+[f・3] | 16 bytes (15 bytes of key setting data + 00h) +0120h | [SHIFT]+[f・4] | 16 bytes (15 bytes of key setting data + 00h) +0130h | [SHIFT]+[f・5] | 16 bytes (15 bytes of key setting data + 00h) +0140h | [SHIFT]+[f・6] | 16 bytes (15 bytes of key setting data + 00h) +0150h | [SHIFT]+[f・7] | 16 bytes (15 bytes of key setting data + 00h) +0160h | [SHIFT]+[f・8] | 16 bytes (15 bytes of key setting data + 00h) +0170h | [SHIFT]+[f・9] | 16 bytes (15 bytes of key setting data + 00h) +0180h | [SHIFT]+[f・10] | 16 bytes (15 bytes of key setting data + 00h) +0190h | [SHIFT]+[vf・1] | 16 bytes (15 bytes of key setting data + 00h) +01A0h | [SHIFT]+[vf・2] | 16 bytes (15 bytes of key setting data + 00h) +01B0h | [SHIFT]+[vf・3] | 16 bytes (15 bytes of key setting data + 00h) +01C0h | [SHIFT]+[vf・4] | 16 bytes (15 bytes of key setting data + 00h) +01D0h | [SHIFT]+[vf・5] | 16 bytes (15 bytes of key setting data + 00h) +01E0h | [ROLL UP] | 6 bytes (5 bytes of key setting data + 00h) +01E6h | [ROLL DOWN] | 6 bytes (5 bytes of key setting data + 00h) +01ECh | [INS] | 6 bytes (5 bytes of key setting data + 00h) +01F2h | [DEL] | 6 bytes (5 bytes of key setting data + 00h) +01F8h | [↑] | 6 bytes (5 bytes of key setting data + 00h) +01FEh | [←] | 6 bytes (5 bytes of key setting data + 00h) +0204h | [→] | 6 bytes (5 bytes of key setting data + 00h) +020Ah | [↓] | 6 bytes (5 bytes of key setting data + 00h) +0210h | [HOME/CLR] | 6 bytes (5 bytes of key setting data + 00h) +0216h | [HELP] | 6 bytes (5 bytes of key setting data + 00h) +021Ch | [SHIFT]+[HOME/CLR] | 6 bytes (5 bytes of key setting data + 00h) +0222h | [CTRL]+[f・1] | 16 bytes (15 bytes of key setting data + 00h) +0232h | [CTRL]+[f・2] | 16 bytes (15 bytes of key setting data + 00h) +0242h | [CTRL]+[f・3] | 16 bytes (15 bytes of key setting data + 00h) +0252h | [CTRL]+[f・4] | 16 bytes (15 bytes of key setting data + 00h) +0262h | [CTRL]+[f・5] | 16 bytes (15 bytes of key setting data + 00h) +0272h | [CTRL]+[f・6] | 16 bytes (15 bytes of key setting data + 00h) +0282h | [CTRL]+[f・7] | 16 bytes (15 bytes of key setting data + 00h) +0292h | [CTRL]+[f・8] | 16 bytes (15 bytes of key setting data + 00h) +02A2h | [CTRL]+[f・9] | 16 bytes (15 bytes of key setting data + 00h) +02B2h | [CTRL]+[f・10] | 16 bytes (15 bytes of key setting data + 00h) +02C2h | [CTRL]+[vf・1] | 16 bytes (15 bytes of key setting data + 00h) +02D2h | [CTRL]+[vf・2] | 16 bytes (15 bytes of key setting data + 00h) +02E2h | [CTRL]+[vf・3] | 16 bytes (15 bytes of key setting data + 00h) +02F2h | [CTRL]+[vf・4] | 16 bytes (15 bytes of key setting data + 00h) +0302h | [CTRL]+[vf・5] | 16 bytes (15 bytes of key setting data + 00h) -------+----------------------+-------------------------------------- * When setting, if the setting data assigned to a key is smaller than the size assigned to one key, the remaining part is filled with 00h. * When setting, even if a value other than 00h is written at the end of a key setting data, the data will be ignored (it will be treated as if 00h was written). * The first 6 characters of the data set for a function key are displayed in the function display section at the bottom of the screen. However, when FEh is placed at the beginning (first byte) of the function key data, the 5 bytes of data from the 2nd byte to the 6th byte are used simply for display, and the characters entered when the key is pressed will be the data set from the 7th byte onwards. FEh in the 1st byte is displayed as a space. * Data set in [CTRL]+[f・1] to [vf・5] can only be entered by executing INT DCh - Function 0Fh Subfunction 0000h. * Data set in [CTRL]+[XFER]/[NFER] can only be entered by executing INT DCh - Function 0Fh Subfunction 0002h. INT DCh - Function 0Ch Subfunction 0100h Classification Extended MS-DOS Name Get contents of data key allocation buffer Target MS-DOS 3.1 (PS98-011) MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Ch AX=0100h DS:DX=buffer address (size 202h bytes) Output No change in register Explanation o MS-DOS 3.1 (PS98-011) and later versions of MS-DOS have a function that allows you to replace character keys (alphanumeric characters, symbols, and kana) with any character string when you press them. This function can read the settings. o For the structure of the buffer, see [Data Key Allocation Buffer Structure]. The number of data keys that have been set is written to offset 000h of DS:DX. The allocation data for the number of data keys that have been set is written from offset 002h onwards. 00h is written after the last assigned data. o At offset 00h of one assigned data, the entire length of that assigned data is written. At offset 02h, the character code of the data key is written. From offset 03h onwards, the replacement string is written. Related INT DCh - Function 0Ch Subfunction 0101h INT DCh - Function 0Dh Subfunction 0100h INT DCh - Function 0Dh Subfunction 0101h Table [Data key allocation buffer structure] -------+-------------------------------------- Offset | Contents -------+-------------------------------------- +000h | Number of subsequent allocation data (words) +002h | Allocated data first : | : +xxxh | Allocated data last +yyyh | 00h -------+-------------------------------------- * When setting a data key with INT DCh - Function 0Dh Subfunction 0100h, it is not necessary to set the number of data items to offset 000h. The number is written when reading. Table [Structure of one assigned data item] -----------+------------------------+-------------------------------------------- Offset | Range of setting value | Contents -----------+------------------------+-------------------------------------------- +00h(WORD) | 0003-0012h | Total length of this assigned data (including this byte) +02h | 00-7Eh, A0-DFh | Character code of data key +03h | | String to be entered (1-15 bytes) : | | (The length of the string is determined by the value of offset +00h) +zzh | | -----------+------------------------+-------------------------------------------- * When setting, the total length of the assigned data must be set to 18 bytes or less. Setting a length exceeding 18 bytes will not return an error and the setting will be made, but setting a string that is too long may cause the system to go out of control. INT DCh - Function 0Ch Subfunction 0101h Classification Extended MS-DOS Name Get remaining capacity of data key allocation buffer Target MS-DOS 3.1 (PS98-011) MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Ch AX=0101h Output AX=remaining capacity of internal buffer (initial value 0200h) Explanation o MS-DOS 3.1 (PS98-011) and later have a function that allows you to replace character keys (alphanumeric characters, symbols, and kana) with any character string when you press them. This function can read the remaining capacity of the internal buffer that stores the settings. The capacity of the internal buffer is 512 bytes. Related INT DCh - Function 0Ch Subfunction 0100h INT DCh - Function 0Dh Subfunction 0100h INT DCh - Function 0Dh Subfunction 0101h INT DCh - Function 0Dh Subfunction 0000-00FFh Category Extended MS-DOS Name Key setting (Programmable key setting) Target MS-DOS 1.25 (PS98-111): IO.SYS MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.1 (PC-98LT/HA): IO.SYS (same as PS98-127) MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Dh AX=Subfunction number (key value) DS:DX=Data buffer address Output No change in register. Explanation o Sets key setting data for programmable keys such as function keys and arrow keys. o For subfunction numbers (key specification values), see [List of key specification values and corresponding keys]. For buffer structure and buffer size, see table [Buffer structure of programmable key setting data]. o The range of supported subfunctions (key specification) varies depending on the MS-DOS version. For the supported range, see table [Subfunction support range by MS-DOS version]. u In MS-DOS 2.0, AX>=0020h rewrites the function display at the bottom of the screen. If no function is displayed, no writing is done. Related INT DCh - Function 0Ch INT DCh - Function 0Dh Subfunction 0100h Classification Extended MS-DOS Name Set contents of data key allocation buffer Target MS-DOS 3.1 (PS98-011) MS-DOS 3.3 (all) MS-DOS 5.0, 5.0A Input CL=0Dh AX=0100h DS:DX=data buffer address Output No change in register Explanation o MS-DOS 3.1 (PS98-011) and later versions of MS-DOS have a function that allows you to replace character keys (alphanumeric characters, symbols, and kana) with any character string when you press them. This function sets it up for this purpose. o When this function is executed, the entire data key allocation buffer is replaced. To add data, you must use INT DCh - Function 0Dh Subfunction 0101h, or load data into the buffer using INT DCh - Function 0Ch Subfunction 0100h, and then add the new data after it. o For the buffer structure, refer to [Data Key Allocation Buffer Structure]. Starting from offset 002h in DS:DX, write allocation data for the number of data keys to be set. Write 00h after the last allocation data. o At offset 00h of one piece of allocation data, write the entire length of that allocation data. At offset 02h, write the character code of the data key. From offset 03h onwards, write the replacement string. Related INT DCh - Function 0Ch Subfunction 0100h INT DCh - Function 0Ch Subfunction 0101h INT DCh - Function 0Dh Subfunction 0101h INT DCh - Function 0Dh Subfunction 0101h Classification Extended MS-DOS Name Add one allocation entry to the data key allocation buffer Target MS-DOS 3.1 (PS98-011) MS-DOS 3.3 (all) MS-DOS 5.0, 5.0A Input CL=0Dh AX=0101h DS:DX=Data buffer address (for one allocated data item) Output AX=0000h Explanation o Used to add one allocation to the data key allocation buffer. o For the structure of the buffer, see [Structure for one allocated data item]. Write the total length of the allocated data to offset 00h of DS:DX. At offset 02h, write the character code of the data key. From offset 03h onwards, write the replacement string. o Data keys can also be assigned using the following escape sequence. --------------------------------------------- ESC+"["+<character string>+"p" --------------------------------------------- * To specify <character string>, you can directly write the characters enclosed in quotation marks (" or '), or you can list the decimal ASCII codes separated by ;, or you can mix them together. The following examples all have the same settings. (Example: ^[["!ABC"p, ^[[33;65;66;67p, ^[[21;"ABCDE"p) * The first character of <character string> is the character code of the data key, and the second and subsequent characters are the string to be entered (1 to 15 bytes). u The MS-DOS Programmer's Reference Manual does not describe the exact usage. u This function does not work properly on MS-DOS 3.1 (PS98-011). MS-DOS 3.3, 3.3A, 3.3B, In 3.3C, it is as follows. When multiple data keys are registered, if you re-register a data key other than the last one registered, the contents of the data key allocation buffer will be destroyed and the registration contents will become invalid. If this happens, you will not be able to register data keys with this function. If you execute INT DCh - Function 0Dh Subfunction 0102h to initialize the buffer, you will be able to register again. This does not happen in MS-DOS 3.3D, 5.0 and later. Related INT DCh - Function 0Ch Subfunction 0100h INT DCh - Function 0Ch Subfunction 0101h INT DCh - Function 0Dh Subfunction 0100h INT DCh - Function 0Dh Subfunction 0102h Classification Extended MS-DOS Name Clear data key allocation buffer Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Dh AX=0102h Output No change in register Explanation o Clears all registered contents of the data key allocation buffer. Related INT DCh - Function 0Dh Subfunction 0100h INT DCh - Function 0Dh Subfunction 0101h INT DCh - Function 0Dh Subfunction 0102h INT DCh - Function 0Eh Subfunction 00h (Normal/High-Res) Classification Extended MS-DOS Name Acquires RS-232C received data length Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS (MS-DOS for both normal and high-res modes) Input CL=0Eh DL=channel/function specification 00h: Channel 0 (built-in RS-232C) 10h: Channel 1 (RS-232C extension line) 20h: Channel 2 (RS-232C extension line) Output [When an existing channel is specified] AX=Number of bytes of data in the receive buffer [When a non-existent channel is specified] AX=FFFFh Explanation o Returns the number of bytes of data in the RS-232C receive buffer. u In MS-DOS 3.1 (PS98-011), this function will not work unless RSDRV.SYS is installed (AX remains unchanged). u In MS-DOS 3.3 (PS98-013) and later, when channel 0 is specified, the installation check for RSDRV.SYS is not performed. Therefore, if RSDRV.SYS is not installed and this function is executed in normal mode with channel 0 specified, meaningless processing will be performed. If this function is executed in high-resolution mode with channel 0 specified, INT 19h - Function 02h (BIOS) will be executed in an uninitialized state. o When the RS-232C extension interface board is not installed, specifying channels 1 and 2 returns AX=FFFFh. The same applies if the BIOS ROM on the RS-232C expansion interface board is KILLed in normal mode. u The main processing is as follows. In normal mode, INT 19h, D4h, D5h - Function 04h (RSDRV) is executed, and in high-resolution mode, INT 19h - Function 02h (BIOS) is executed. Related INT DCh - Function 0Eh Subfunction 01h INT DCh - Function 0Eh Subfunction 00h (Normal) Classification Extended MS-DOS Name Acquires RS-232C receive data length Target MS-DOS 1.25 (PS98-111): IO.SYS MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (PS98-125, 127, 129): IO.SYS MS-DOS 3.1 (PC-98LT, HA): IO.SYS (MS-DOS for normal mode only) Input CL=0Eh DL=00 Output AX=Number of bytes of data in receive buffer Explanation o Returns the number of bytes of data in the RS-232C receive buffer. o For PS98-127, 129, this function will not work unless RSDRV.SYS is installed (AX remains unchanged). o The normal mode-only MS-DOS for which this item is targeted only supports channel 0. When executed with DL≠00h, AX remains unchanged on MS-DOS 1.25, and returns AX=0000h on other systems. u The main processing is as follows. Executes INT 19h - Function 04h (RSDRV). Related INT DCh - Function 0Ah (Normal) INT DCh - Function 0Eh Subfunction 00h (Hi-Res) Classification Extended MS-DOS Name Acquires RS-232C receive data length Target MS-DOS 2.0 (PS98-XA121/XL121): IO.SYS MS-DOS 3.1 (PS98-XA125/XL125): IO.SYS (High-Res mode only MS-DOS) Input CL=0Eh DL=Channel designation 00h: Channel 0 (built-in RS-232C) 10h: Channel 1 (RS-232C extension line) 20h: Channel 2 (RS-232C extension line) Output AX=Number of bytes of data in receive buffer Explanation o Returns the number of bytes of data in the RS-232C receive buffer. o On the PS98-XL121 and XL125, this function will not work unless RSDRV.SYS is installed (AX remains unchanged). u The main processing is as follows. Executes INT 19h - Function 02h (BIOS) and returns the obtained CX value. No checks are made as to whether an RS-232C expansion interface board is installed or not. Related INT DCh - Function 0Ah (Normal) INT DCh - Function 0Eh Subfunction 01h Classification Extended MS-DOS Name Initialize RS-232C port Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Eh DL=Channel and function specification 01h Channel 0 (built-in RS-232C) 11h Channel 1 (RS-232C extension line) 21h Channel 2 (RS-232C extension line) BH=Communication parameter specification bit 7,6:Stop bit length 11b=2 bits 01b=1 bit bit 5:Parity specification 1=Even 0=Odd bit 4:Parity specification 1=Yes 0=No bit 3,2:Data bit length 11b=8 bits 10b=7 bits bit 1:0 bit 0:X flow control 1=Yes 0=No BL=Specify communication speed bits 7-4: Set 0000b bits 3-0: Communication speed 1001b=19200bps ■Only for devices that support 19200bps 1000b=9600bps 0111b=4800bps 0110b=2400bps 0101b=1200bps 0100b= 600bps 0011b= 300bps 0010b= 150bps 0001b= 75bps 0000b= Disabled * Communication speed can only be specified on channel 0. Output AX=Return code 0000h Normal end FFFFh Abnormal end (Extended RS-232C board not installed) Explanation o Initializes RS-232C port hardware and work area. After this, input/output using AUX, AUX1, and AUX2 devices becomes possible. o A 256-byte receive buffer is allocated. u To determine whether the device supports 19200bps, refer to F8E8:0002h (normal) or FFE8:0002h (high-resolution). If the device supports 19200bps, 19200bps can be used in the BIOS even in high-resolution mode of the 98 high-resolution board (PC-9821A-E02). u In MS-DOS 3.1 (PS98-011), this function will not work unless RSDRV.SYS is installed (AX remains unchanged). u In MS-DOS 3.3 (PS98-013) and later, when channel 0 is specified in normal mode, no check is made to see if RSDRV.SYS is installed. Therefore, when RSDRV.SYS is not installed and this function is executed in normal mode with channel 0 specified, meaningless processing will be performed. o When an RS-232C expansion interface board is not installed, specifying channels 1 or 2 will return AX=FFFFh. The same applies in normal mode when the BIOS ROM on the RS-232C expansion interface board is KILLed. u The main processing is as follows. In normal mode, INT 19h, D4h, D5h - Function 00h (RSDRV) is executed. In high-resolution mode, when channel 0 is specified, INT DCh - Function 0Ah is executed internally, and when channels 1 or 2 are specified, INT 19h - Function 00h (BIOS) is executed. In some versions of MS-DOS 5.0A (such as the version included with PC-9821Af・Ne and PC-9801NX/C・P), even if SPEED.EXE is executed, the RS-232C interrupt (INT 0Ch) may remain masked by the interrupt controller. This does not happen if this function is executed directly. Related INT DCh - Function 0Eh Subfunction 00h INT DCh - Function 0Eh Subfunction 06h 0060:0068h 0060:17EEh F8E8:0002h [Normal] FFE8:0002h [Hi-Res] INT DCh - Function 0Eh Subfunction 06h Classification Extended MS-DOS Name RS-232C port protocol read Undocumented Target MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Eh DL=Channel/function specification 06h Channel 0 (built-in RS-232C) 16h Channel 1 (RS-232C extension line) 26h Channel 2 (RS-232C extension line) Output AX=Return code 0000h Normal end FFFFh Abnormal end (extension RS-232C board not installed) BH=Communication parameters * INT DCh - Function 0Eh Same as Subfunction 01h BL=Communication speed * INT DCh - Function 0Eh Same as Subfunction 01h Explanation o INT DCh - Function 0Eh Reads the protocol set by Subfunction 01h. u In MS-DOS 3.3 (PS98-013) and later, when channel 0 is specified, the incorporation check of RSDRV.SYS is not performed. Therefore, even if RSDRV.SYS is not incorporated, if channel 0 is specified and this function is executed, the value of 0060:0068h is read. The contents are copied from memory switches 1 and 2 when MS-DOS is started. u If this function is executed before RS-232C initialization, the value of 0060:0068h (the value copied from memory switches 1 and 2) is read when channel 0 is specified. If channel 1 or 2 is specified, 0000h is read. u In high-resolution mode, if RS-232C channel 0 is initialized by INT DCh - Function 0Ah, communication parameters etc. are not saved in the work area (0060:0068h), so the protocol cannot be read correctly with this function. The main processing is as follows: When channel 0 is specified, the value read from 0060:0068h is returned; when channel 1 is specified, the value read from 0060:17EEh, 17EFh is returned; when channel 2 is specified, the value read from 0060:17F0h, 17F1h is returned. Related INT DCh - Function 0Eh Subfunction 01h 0060:0068h 0060:17EEh 0060:17F0h INT DCh - Function 0Eh Subfunction 07h Classification Extended MS-DOS Name Check for the presence of an extended RS-232C board Undocumented Target MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Eh DL=07h Output AX=Return code 0000h Extended RS-232C board is installed FFFFh Extended RS-232C board is not installed Explanation o Checks whether an extended RS-232C board is installed. It works even if RSDRV.SYS is not installed. u The main processing contents are as follows. If the value is other than FFh when reading from I/O 00B3h, it is determined that an extended RS-232C board is installed. In reality, the value of the upper 4 bits of DL is arbitrary. Related I/O 00B3h INT DCh - Function 0Fh Subfunction 0000h,0001h Classification Extended MS-DOS Name [CTRL]+Function key as soft key/cancel Target MS-DOS 3.1 (PS98-125・127・129・011・XA125):IO.SYS MS-DOS 3.1 (PC-98LT・HA):IO.SYS MS-DOS 3.3 (all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=0Fh AX=Subfunction number 0000h: [CTRL]+Function key input can be obtained from application 0001h: [CTRL]+Function key operation is monopolized by MS-DOS (default) Output No change in register Explanation o When you press [CTRL] + function key, this sets whether the application can receive the key input, or whether MS-DOS will occupy it and perform operations such as switching the number of lines on the screen. o When [CTRL] + function key input can be received by an application, the string set in INT DCh - Function 0Dh will be entered into the application. o When [CTRL] + function key operation is occupied by MS-DOS, the key functions are as follows. -------------+------------------------------ Key | Function -------------+------------------------------ [CTRL]+[f・4] | Graph character/Kanji display mode switch [CTRL]+[f・5] | Hexadecimal input [CTRL]+[f・6] | Number of lines switch [CTRL]+[f・7] | Function key display switch [CTRL]+[f・8] | Screen clear [CTRL]+[f・9] | Screen scroll speed switch -------------+------------------------------ Related 0060:010Ch bit 0 INT DCh - Function 0Fh Subfunction 8000h INT DCh - Function 0Fh Subfunction 0002h,0003h Classification Extended MS-DOS Name [CTRL]+[XFER]/[NFER] softkey/cancel Undocumented Target MS-DOS 3.1 (PS98-125/127/129/011):IO.SYS MS-DOS 3.1 (PC-98LT/HA):IO.SYS MS-DOS 3.3 (all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=0Fh AX=subfunction number 0002h: [CTRL]+[XFER]/[NFER] input can be obtained from application 0003h: [CTRL]+[XFER]/[NFER] input is occupied by MS-DOS (default) Output No change in register Explanation o In an environment where the Japanese input FEP is not installed, when [CTRL]+[XFER] or [CTRL]+[NFER] is pressed, this sets whether to enter hexadecimal kanji characters or to allow the application to receive key input. However, if the Japanese input FEP is installed, [CTRL]+[XFER]/[NFER] cannot be received from the application even if this function is set. o When [CTRL]+[XFER]/[NFER] input can be received from the application, the string set in INT DCh - Function 0Dh Subfunction 0039h is entered into the application. o It is not possible to distinguish between [CTRL]+[XFER] and [CTRL]+[NFER] input. Related 0060:010Ch bit 1 INT DCh - Function 0Dh Subfunction 0039h INT DCh - Function 0Fh Subfunction 8002h INT DCh - Function 0Fh Subfunction 8000h Classification Extended MS-DOS Name Reads the soft key status of [CTRL]+function key Target MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=0Fh AX=8000h Output AX=[CTRL]+function key status 0000h [CTRL]+function key input can be obtained from the application 0001h [CTRL]+function key operation is monopolized by MS-DOS Explanation o INT DCh - Function 0Fh Subfunction 0000h, 0001h are used to read the status set. Related 0060:010Ch bit 0 INT DCh - Function 0Fh Subfunction 0000h,0001h INT DCh - Function 0Fh Subfunction 8002h Classification Extended MS-DOS Name [CTRL]+[XFER]・[NFER] softkey/cancel status acquisition Undocumented Target MS-DOS 3.3(all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=0Fh AX=8002h Output AX=[CTRL]+[XFER]・[NFER] softkey/cancel status 0000h: [CTRL]+[XFER]・[NFER] input can be acquired from application 0001h: [CTRL]+[XFER]・[NFER] input is occupied by MS-DOS (default) Explanation o INT DCh - Function 0Fh Reads the status set by Subfunction 0002h,0003h. Related 0060:010Ch bit 1 INT DCh - Function 0Fh Subfunction 0002h,0003h INT DCh - Function 10h Subfunction 00h Classification Extended MS-DOS Name Direct console output - 1 byte screen output Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 00h DL = Character to output Output No change in register Explanation o Outputs 1 byte of character data to the text screen. 2-byte characters are output in the order of the first byte, then the second byte. Related INT DCh - Function 10h Subfunction 01h Classification Extended MS-DOS Name Direct console output - output string to screen Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 01h DS:DX = start address of string (end of string is '$') Output No change in register Explanation o Outputs string to text screen. Related INT DCh - Function 10h Subfunction 02h Classification Extended MS-DOS Name Direct console output - Set character attributes Target MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 02h DL = Attribute information (same as expression on VRAM) ■ [PC-H98] Extended attribute mode (Undocumented) DX = Attribute information (same as expression on VRAM) Output No change in register Explanation o Sets the attribute when displaying characters. u MS-DOS 3.3C and later support the extended attribute mode of PC-H98. In extended attribute mode, the DX register specifies the 16-bit attribute. Related 0060:011Dh 0060:013Ch INT DCh - Function 10h Subfunction 03h Classification Extended MS-DOS Name Direct console output - Set cursor position Target MS-DOS 2.0(all):IO.SYS MS-DOS 3.1(all):IO.SYS MS-DOS 3.3(all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=10h AH=03h DH=line position DL=column position Output No change in register Explanation o Sets cursor position. Characters are displayed at cursor position. The position is specified as (0,0) at the top left of the screen. u If a value exceeding the maximum number of lines or columns is specified, the following operation will occur. Maximum value to DFh: Treated as maximum value E0 to FFh: Treated as 0 Related INT DCh - Function 10h Subfunction 04h Classification Extended MS-DOS Name Direct console output - Move cursor down one line Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=10h AH=04h Output No change in register Explanation o Moves cursor down one line. Column position does not change. When cursor is on bottom line, entire screen scrolls up. Related INT DCh - Function 10h Subfunction 05h Classification Extended MS-DOS Name Direct console output - move cursor up one line Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=10h AH=05h Output No change in register Explanation o Moves cursor up one line. Column position does not change. If cursor is on top line, entire screen scrolls down. Related INT DCh - Function 10h Subfunction 06h Classification Extended MS-DOS Name Direct console output - Move cursor up a specified number of lines Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 06h DL = number of lines to move Output No change in register Explanation o Moves the cursor up the number of lines specified by DL. The column position does not change. If the cursor is moved beyond the top line, the cursor is set to the top line. In this case, the screen does not scroll. o When DL = 0, it operates the same as when 1 is specified. Related INT DCh - Function 10h Subfunction 07h Classification Extended MS-DOS Name Direct console output - Move cursor down a specified number of lines Target MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 07h DL = number of lines to move Output No change in register Explanation o Moves the cursor down the number of lines specified by DL. The column position does not change. If the cursor is moved beyond the bottom line, the cursor is set to the bottom line. In this case, the screen does not scroll. o When DL = 0, it operates the same as when 1 is specified. Related INT DCh - Function 10h Subfunction 08h Classification Extended MS-DOS Name Direct console output - Move cursor to the right a specified number of columns Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 08h DL = number of columns to move Output No change in register Explanation o Moves the cursor to the right the number of columns specified by DL. The line position does not change. If the cursor is moved beyond the right end, the cursor is set to the right end. o When DL = 0, it operates the same as when 1 is specified. Related INT DCh - Function 10h Subfunction 09h Classification Extended MS-DOS Name Direct console output - Move cursor to the left by the specified number of columns Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 09h DL = number of columns to move Output No change in register Explanation o Moves the cursor to the left by the number of columns specified by DL. The line position does not change. If the cursor is moved beyond the left end, the cursor is set to the left end. o When DL = 0, it operates the same as when 1 is specified. Related INT DCh - Function 10h Subfunction 0Ah Classification Extended MS-DOS Name Direct console output - screen clear Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 0Ah DL = function specification 00h Clear from cursor position to bottom right edge (cursor position does not change) 01h Clear from top left edge to cursor position (cursor position does not change) 02h Clear entire screen (cursor moves to (0,0)) Output No change in register Explanation o Clears the specified part of the screen. Related INT DCh - Function 10h Subfunction 0Bh Classification Extended MS-DOS Name Direct console output - line clear Applicable to MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=10h AH=0Bh DL=function specification 00h Clears from cursor position to right edge of line 01h Clears from left edge of line to cursor position 02h Clears entire line at cursor position Output No change in register Explanation o Clears the specified part of the screen. The cursor position does not change. Related INT DCh - Function 10h Subfunction 0Ch Classification Extended MS-DOS Name Direct console output - insert specified number of lines at cursor position Target MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 0Ch DL = number of lines to insert Output No change in register Explanation o Scrolls down the lines below the cursor position (including the cursor line) by the number of lines specified by DL, and inserts blank lines. The cursor moves to the left end of the same line. When DL = 0, it is treated as if 1 was specified. Related INT DCh - Function 10h Subfunction 0Dh Classification Extended MS-DOS Name Direct console output - delete specified lines from cursor line Target MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 0Dh DL = number of lines to delete Output No change in register Explanation o Deletes the number of lines below the cursor position (including the cursor line) specified by DL, and scrolls the next line up to the cursor position. The cursor moves to the left end of the same line. When DL = 0, it is treated as if 1 was specified. Related INT DCh - Function 10h Subfunction 0Eh Classification Extended MS-DOS Name Direct console output - Kanji/Graph mode switching Target MS-DOS 2.0 (all): IO.SYS MS-DOS 3.1 (all): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 10h AH = 0Eh DL = function specification 00h Shift JIS Kanji display mode (default) 03h Graphic character display mode Output No change in register Explanation o Switches between the mode displaying Shift JIS Kanji and the mode displaying graphic characters. o When a value in the range of 81-9Fh or E0-FCh is output to the screen, in Shift JIS Kanji display mode it is treated as the first byte of a two-byte character. In graphic character display mode, graphic characters are displayed. If a value other than 00h or 03h is specified for DL, it is ignored. o You can also switch modes using the following escape sequence. ----------------+----------------------------- Escape sequence | Mode ----------------+----------------------------- ESC+")0" | Shift JIS kanji display mode ESC+")3" | Graphic character display mode ----------------+----------------------------- o You can also switch modes using the keyboard. Entering [CTRL]+[f・4] from the keyboard will toggle the mode. Related 0060:008Ah INT DCh - Function 10h Subfunction 0F~FFh Classification Extended MS-DOS Name Direct console output - execution prohibited Undocumented Target MS-DOS 2.0(all):IO.SYS MS-DOS 3.1(all):IO.SYS MS-DOS 3.3(all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=10h AH=0F~FFh Output No change in register Explanation u Be careful when executing with AH=0F~FFh, as it will run out of control. Related INT DCh - Function 11h Subfunction 0000h,0001h Classification Extended MS-DOS Name Change printer mode - Specify Kanji:ANK ratio Target MS-DOS 3.1 (PS98-127・129・011・XA125):IO.SYS MS-DOS 3.1 (PC-98LT・HA):IO.SYS MS-DOS 3.3 (all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=11h AX=Specify Kanji:ANK ratio 0000h Set Kanji:ANK character width ratio to 1.5:1 0001h Set Kanji:ANK character width ratio to 2:1 (default) Output No change in register Explanation o When outputting characters to the printer, this sets whether to insert spaces so that Kanji characters are spaced twice as far apart as ANK characters. If you set the character width ratio of Kanji:ANK to 1.5:1, no spaces will be inserted. o This function itself can be executed even if PRINT.SYS is not built in. Related INT DCh - Function 11h Subfunction 8000h 0060:1E57h bit 0 INT DCh - Function 11h Subfunction 0010h,0011h Classification Extended MS-DOS Name Change printer mode - Specify horizontal/vertical kanji writing Undocumented Target MS-DOS 3.1 (PS98-127/129/011/XA125): IO.SYS MS-DOS 3.1 (PC-98LT/HA): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=11h AX=subfunction number 0010h Specify vertical kanji writing 0011h Specify horizontal kanji writing (default) Output No change in register Explanation o When outputting kanji to the printer, specifies whether to write vertically (enter kanji with escape sequence "^[K") or horizontally (enter kanji with escape sequence "^[t"). ANK characters (1-byte characters) are always written horizontally. o This function itself can be executed even if PRINT.SYS is not installed. Related INT DCh - Function 11h Subfunction 8010h 0060:1E57h bit 1 INT DCh - Function 11h Subfunction 0020h,0021h Classification Extended MS-DOS Name Change printer mode - [CTRL]+[P]・[N] operation specification Target MS-DOS 3.1(PS98-011):IO.SYS MS-DOS 3.3(all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=11h AX=Subfunction number 0020h Do not output CR/LF to the printer when [CTRL]+[P]・[N] is pressed even times 0021h Output CR/LF to the printer when [CTRL]+[P]・[N] is pressed even times (default) Output No change in register Explanation o Sets whether to output CR/LF code to the printer when [CTRL]+[P]・[N] is pressed even times. o Pressing [CTRL]+[P] or [N] toggles the mode in which screen output is also printed to the printer on and off. By default, CR/LF is output to the printer when this mode is turned OFF. For this reason, even in applications that do not output to the screen via MS-DOS, if MS-DOS is used for key input, even-numbered [CTRL]+[P] or [N] inputs may result in output to the printer. If you set the mode to not output CR/LF, you can prevent unnecessary printer output. o This function itself can be executed even if PRINT.SYS is not installed. Related INT DCh - Function 11h Subfunction 8020h 0060:1E57h bit 7 INT DCh - Function 11h Subfunction 8000h Classification Extended MS-DOS Name Get printer mode - Get Kanji:ANK ratio Undocumented Target MS-DOS 3.1(PS98-011):IO.SYS MS-DOS 3.3(all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=11h AX=8000h Output AX=return code 0000h Kanji:ANK character width ratio=1.5:1 0001h Kanji:ANK character width ratio=2:1(default) Explanation o Gets the status of the Kanji:ANK ratio. o This function itself can be executed even if PRINT.SYS is not installed. Related INT DCh - Function 11h Subfunction 0000h,0001h 0060:1E57h bit 0 INT DCh - Function 11h Subfunction 8010h Classification Extended MS-DOS Name Get printer mode - Get kanji horizontal/vertical writing setting Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=11h AX=8010h Output AX=return code 0000h Kanji vertical writing setting 0001h Kanji horizontal writing setting (default) Explanation o Gets the status of kanji horizontal/vertical writing setting. o This function itself can be executed even if PRINT.SYS is not installed. Related INT DCh - Function 11h Subfunction 0010h,0011h 0060:1E57h bit 1 INT DCh - Function 11h Subfunction 8020h Classification Extended MS-DOS Name Get printer mode - Get [CTRL]+[P]・[N] operation setting Undocumented Target MS-DOS 3.1(PS98-011):IO.SYS MS-DOS 3.3(all):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=11h AX=8020h Output AX=return code 0000h Do not output CR/LF to the printer when [CTRL]+[P]・[N] is pressed even times 0001h Output CR/LF to the printer when [CTRL]+[P]・[N] is pressed even times (default) Explanation o Gets the setting status of [CTRL]+[P]・[N] operation. o This function itself can be executed even if PRINT.SYS is not installed. Related INT DCh - Function 11h Subfunction 0020h,0021h 0060:1E57h bit 7 INT DCh - Function 12h Classification Extended MS-DOS Name Get MS-DOS product version and model information Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 12h Output AX = product number DX = model information Explanation o Reads the MS-DOS product number and model information. See "Correspondence between MS-DOS version, product number and internal revision number" and "Meaning of model information". o MS-DOS that support this function will always return AX ≠ 0000h, so if you execute this function with AX = 0000h and it returns with AX = 0000h, you can determine that the MS-DOS does not support this function. u It is better not to use the model information returned to DX, as the range that can be determined varies depending on the version of MS-DOS. Related 0060:0020h INT DCh - Function 15h Subfunction 0000h Table MS-DOS version - product number - internal revision number ---------------+---------+-------------------+------------------------------------ MS-DOS | Product | Internal Revision | Notes Version | Number | number | ---------------+---------+-------------------+------------------------------------ 3.1(PS98-011) | 0001h | - | 3.3 | 0002h | - | 3.3A | 0002h | - | 3.3B | 0002h | - | 3.3C | 0003h | - | 3.3D | 0004h | - | 3.3D-R | 0005h | - | PC-9801NL ROM DISK 5.0 | 0101h | 01h | Initial shipping version 5.0 | 0101h | 03h | Revised version 5.0A | 0102h | 01h | Initial shipping version 5.0A-H | 0102h | 01h | PC-9801NA (includes HD model) | | | The only difference from the initial shipping version is the title text 5.0A-H | 0102h | 03h | 1.44MB FD support | | | PC-9821Ap (includes FD model) | | | Included with PC-9801NS/R 5.0A-H | 0104h | 04h | PC-9821Ap (includes HD model) | | | The only difference from internal revision 03h is | | | Product number and internal revision number ---------------+---------+-------------------+------------------------------------ * Product number is the value of AX after executing INT DCh - Function 12h * Internal revision number is the value of AL after executing INT DCh - Function 15h Subfunction 0000h Table Meaning of Model Information ------+----------------------------------------------------------------- Value | MS-DOS 3.1 (PS98-011) ------+----------------------------------------------------------------- 0000h | PC-9801 original 0001h | PC-9801E, F, M 0002h | PC-9801U 0003h | Normal mode other than PC-9801 original, E, F, M, U 0100h | PC-98XA 0101h | High-resolution mode other than PC-98XA ------+----------------------------------------------------------------- ------+----------------------------------------------------------------- Value | MS-DOS 3.3, 3.3A (PS98-013, PS98-015) ------+----------------------------------------------------------------- 0000h | PC-9801 original 0001h | PC-9801E/F/M 0002h | PC-9801U 0003h | Normal mode except PC-9801 original/E/F/M/U | 0000:0481h bit 7,6 = 00b 0004h | Normal mode except PC-9801 original/E/F/M/U | 0000:0481h bit 7,6 = 01b 0100h | PC-98XA 0101h | Hi-res mode except PC-98XA 1000h | Normal mode when 0000:0481h = 1xxxx001b 1100h | Hi-res mode when 0000:0481h = 1xxxx001b 1001h | Normal mode when 0000:0481h = 1xxxx010b 1101h | High-resolution mode when 0000:0481h = 1xxxx010b 1002h | Normal mode when 0000:0481h = 1xxxx100b 1102h | High-resolution mode when 0000:0481h = 1xxxx100b 1002h | Other than the above when 0000:0481h = 1xxxxxxxb ------+----------------------------------------------------------------- * 0000:0481h bits 7,6 are thought to have been changed to 0000:0458h bits 7,6 later. 0000:0458h bit 7 is the NESA flag, bit 6 is the multimedia architecture flag (representing PC-98GS). However, neither PC-H98 (NESA) nor PC-98GS was announced when MS-DOS 3.3A was shipped. ------+----------------------------------------------------------------- Value | MS-DOS 3.3B (PS98-017) ------+----------------------------------------------------------------- 0000h | PC-9801 original 0001h | PC-9801E・F・M 0002h | PC-9801U 0003h | Normal mode except PC-9801 original・E・F・M・U, PC-98GS, PC-H98 0004h | PC-98GS 0100h | PC-98XA 0101h | Hi-res mode except PC-98XA, PC-H98 1004h | PC-H98 normal 1101h | PC-H98 hi-res ------+----------------------------------------------------------------- * MS-DOS At the time of shipping of 3.3B, neither the PC-H98 nor the PC-98GS had been announced. ------+----------------------------------------------------------------- Value | MS-DOS 3.3C, 3.3D (PS98-019, PS98-1002) ------+----------------------------------------------------------------- 0000h | PC-9801 original 0001h | PC-9801E・F・M 0002h | PC-9801U 0003h | Normal mode except PC-9801 original・E・F・M・U, PC-98GS, PC-H98 0004h | PC-98GS 0100h | PC-98XA 0101h | High-resolution mode except PC-98XA, PC-H98 1004h | PC-H98 normal mode (actual CPU is other than i486) 1005h | PC-H98 normal mode (actual CPU is i486) 1101h | PC-H98 high-resolution mode (actual CPU is other than i486) 1102h | PC-H98 high-resolution mode (actual CPU is i486) ------+----------------------------------------------------------------- * Pentium processors, ODP DX2, etc. are also included in "actual CPU is other than i486". ------+----------------------------------------------------------------- Value | MS-DOS 5.0, 5.0A (PS98-1003-x1, PS98-1003-x2) ------+----------------------------------------------------------------- 0000h | PC-9801 original 0001h | PC-9801E・F・M 0002h | PC-9801U 0003h | PC-9801 original・E・F・M・U, normal mode other than PC-H98 | 0000:0481h bit 6 = 0 0004h | PC-9801 original・E・F・M・U, normal mode other than PC-H98 | 0000:0481h bit 6 = 1 0100h | PC-98XA 0101h | High-resolution mode other than PC-98XA, PC-H98 1004h | PC-H98 normal mode (actual CPU is other than i486) 1005h | PC-H98 normal mode (actual CPU is i486) 1101h | PC-H98 high-resolution mode (actual CPU is other than i486) 1102h | PC-H98 high-resolution mode (actual CPU is i486) ------+----------------------------------------------------------------- * Actually, 0000:0458h bit 6 (multimedia architecture flag = PC-98GS) should be checked, not 0000:0481h bit 6. * Pentium processors, ODP DX2, etc. are also included in "actual CPU is other than i486". INT DCh - Function 12h (LT/HA) Classification Extended MS-DOS Name Replacement of disk swap display Undocumented Target MS-DOS 3.1 (PC-98LT/HA): IO.SYS Input CL=12h AX=Function specification 0000h: IO.SYS displays disk swap (default) 0001h: User routine displays disk swap ■When AX=0001h DS:DX=Entry address of user routine to be called (FAR CALL) Output No change in register Explanation o When there is one floppy disk (equivalent) drive, if you access the A: drive and the B: drive alternately, IO.SYS displays "Insert the disk corresponding to drive A: (B:) and press the appropriate key" and waits for key input. This function allows you to set a routine to replace that process. o The user routine set in DS:DX is called from within IO.SYS with FAR CALL. At this time, the number of the next drive to be accessed is set in AL (00h=A:, 01h=B:). The user routine must guarantee all registers. o Function only for PC-98LT・HA. Related INT DCh - Function 14h Subfunction 0000h(LT・HA) 0060:0082h 0060:0090h INT DCh - Function 13h Classification Extended MS-DOS Name Get MS-DOS drive name - DA/UA matching list Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 13h DS:DX = DA/UA list output buffer (buffer size 60h bytes) Output No register change Explanation o Writes a list showing which disk device the MS-DOS drive is assigned to into the memory specified by DS:DX. o The DA/UA of A: to Z: drives is set to odd addresses between offset +1B and +4Dh of the list. DA/UA is also set to offset +00 to +0Fh, but only information up to P: drive can be obtained. u As a rule, information on the block device built into IO.SYS is written. Information about drives added by device drivers cannot be obtained. The exceptions are the RAMDISK.SYS that comes with MS-DOS and the JEIDA memory card drive (MCDRV.SYS), whose information can be obtained using this function. Related 0060:0038h 0060:006C-007Bh 0060:0136h 0060:013Bh 0060:2C86-2CB9h Table DA/UA list output buffer structure -------+---------- -------+----------------- -------+--------------- Offset | Contents Offset | Contents Offset | Contents -------+---------- -------+----------------- -------+--------------- +00h | A:DA/UA +1Ah | A:Attribute +34h | N:Attribute +01h | B:DA/UA +1Bh | A:DA/UA +35h | N:DA/UA +02h | C:DA/UA +1Ch | B:Attribute +36h | O:Attributes +03h | D:DA/UA +1Dh | B:DA/UA +37h | O:DA/UA +04h | E:DA/UA +1Eh | C:Attributes +38h | P:Attributes +05h | F:DA/UA +1Fh | C:DA/UA +39h | P:DA/UA +06h | G:DA/UA +20h | D:Attributes +3Ah | Q:Attributes +07h | H:DA/UA +21h | D:DA/UA +3Bh | Q:DA/UA +08h | I:DA/UA +22h | E:Attributes +3Ch | R:Attributes +09h | J:DA/UA +23h | E:DA/UA +3Dh | R:DA/UA +0Ah | K:DA/UA +24h | F:Attribute +3Eh | S:Attribute +0Bh | L:DA/UA +25h | F:DA/UA +3Fh | S:DA/UA +0Ch | M:DA/UA +26h | G:Attribute +40h | T:Attribute +0Dh | N:DA/UA +27h | G:DA/UA +41h | T:DA/UA +0Eh | O:DA/UA +28h | H:Attribute +42h | U:Attribute +0Fh | P:DA/UA +29h | H:DA/UA +43h | U:DA/UA +10h | 00h +2Ah | I:Attribute +44h | V:Attribute +11h | 00h +2Bh | I:DA/UA +45h | V:DA/UA +12h | 00h +2Ch | J:Attribute +46h | W:Attribute +13h | 00h +2Dh | J:DA/UA +47h | W:DA/UA +14h | 00h +2Eh | K:Attribute +48h | X:Attribute +15h | 00h +2Fh | K:DA/UA +49h | X:DA/UA +16h | 00h +30h | L:Attribute +4Ah | Y:Attributes +17h | 00h +31h | L:DA/UA +4Bh | Y:DA/UA +18h | 00h +32h | M:Attributes +4Ch | Z:Attributes +19h | 00h +33h | M:DA/UA +4Dh | Z:DA/UA ------+----------- -------+----------------- -------+--------------- ------+------------------------------------------------------------ Offset Contents ------+------------------------------------------------------------ +4Eh | 00h=Physical drive and logical drive are in 1:1 correspondence | FFh=Two logical drives are assigned to one physical drive | (Copy of 0060:0038h) +4Fh | 00h=Physical drive and logical drive are in 1:1 correspondence | FFh = 2 logical drives assigned to 1 physical drive | (Copy of 0060:013Bh) +50h | Last accessed drive number (A:=00h) | (Copy of 0060:0136h) +51~ | 5Fh | 00h (unused) ------+------------------------------------------------------------ * In MS-DOS 5.0, 2 logical drives are assigned to 1 physical drive when there is only 1 floppy disk. The difference between offset +4Eh and +4Fh is unknown. * As a rule, DA/UA values are not set for block devices added in CONFIG.SYS. PCMCIA memory card drives (MCDRV.SYS) and RAM DISK (RAMDISK.SYS) are exceptions. [DA/UA meaning] -------+------------------------------------------------ DA/UA | Device type -------+------------------------------------------------ 00h | No drive 68-6Bh | Virtual drive connected to BRANCH 4670 I/F 70-73h | Drive connected to 640KB FD I/F 80-83h | SASI, ESDI, IDE HD 90-93h | Drive connected to 1MB FD I/F A0-A6h | HD, 3.5"MO, 5"MO, CD-ROM connected to SCSI I/F D0h | ROM drive D1h | PCMCIA memory card drive E0h | RAM DISK (RAMDISK.SYS) -------+------------------------------------------------ * For dual-use FD I/F, it becomes 9xh when in 1MB I/F mode, and 7xh when in 640KB I/F mode. * The external 1MB FDD, whose existence can be confirmed at 0000:0494h, will also be 7xh. In this case, since the external 1MB FDD is dedicated to 1MB, you cannot read/write to that drive with INT 1Bh at DA/UA=7xh. You can only read/write with DA/UA=Fxh. * To access a drive with DA/UA=D0h via BIOS, use INT 1Fh - Function 94h,95h. * To access a drive with DA/UA=D1h via BIOS, use INT 1Fh - Function B4 to B8h. PC-9801NL can be used as standard. Machines with PCMCIA2.0 slots can be used when MCDRV.SYS is installed. * To access a RAM DISK with DA/UA=E0h via BIOS, use INT 1Bh - Function 05h,06h (RAMDISK). [Meaning of attribute] ------+---------------------------------------------------------- bit | Meaning ------+---------------------------------------------------------- 7 | 1=Two logical drives are assigned to one physical drive | 0=Physical drive and logical drive are one-to-one. 6-2 | Unused 1 | Logical drive sector specification width (MS-DOS 5.0 and later) | 1=32-bit sector (drive with BPB offset 13h 0) | 0=16-bit sector (drive with BPB offset 13h other than 0) 0 | MO identification | 1=5"MO, 3.5"MO | 0=Other ------+---------------------------------------------------------- * There is no flag to indicate dual-use, 3-mode drive, etc. INT DCh - Function 13h (LT/HA) Classification Extended MS-DOS Name Screen hardcopy Undocumented Target MS-DOS 3.1 (PC-98LT/HA): IO.SYS Input CL=13h AX=0000h Hardcopy of text screen AX=0001h Output image from G-VRAM AX=0002h Output image from G-VRAM (same process as AX=0001h) Output No change in registers No change in registers Explanation o Outputs a hardcopy of the screen to a printer. Part of this routine is shared with the hardcopy routine in INT 05h. o A function only available in PC-98LT/HA. Related INT DCh - Function 14h Subfunction 0000h,0001h Classification Extended MS-DOS Name Extended attribute mode setting Undocumented Target MS-DOS 3.3D:IO.SYS MS-DOS 5.0, 5.0A:IO.SYS PC-H98 (normal/high-resolution) Input CL=14h AX=mode specification 0000h: EGH mode 0001h: PC mode (default) Output No change in register Explanation o Sets the extended attribute mode. u Mode switching can also be done with the following escape sequence. (Undocumented) ----------------+----------------------------- Escape sequence | mode ----------------+----------------------------- ESC+"[?5h" | EGH mode ESC+"[?5l" | PC mode ----------------+----------------------------- o When the attribute mode is changed, the current display attribute in the IO.SYS work area is set to the erase attribute. o Does nothing on models other than the PC-H98. Related 0060:011Dh 0060:0114h 0060:013Ch 0060:013Eh 0060:05D6h INT 18h - Function 2Ah INT DCh - Function 14h Subfunction 8000h INT DCh - Function 14h Subfunction 0010h,0011h Classification Extended MS-DOS Name Text mode setting Undocumented Target MS-DOS 5.0, 5.0A:IO.SYS PC-H98 (normal), PC-98GS, PC-9821 (excluding Bp, Bs, Be, Bf, Ts) Input CL=14h AX=mode specification 0010h: 25 lines of space between lines 0011h: 20/25 lines (default) Output No change in register Explanation o Switches between 25 lines of space between lines and normal 20/25 lines of space. Only PC-H98 is supported in MS-DOS 5.0. Supports PC-H98, PC-98GS, and PC-9821 (except Bp, Bs, Be, Bf, and Ts) on MS-DOS 5.0A and later. Does nothing on unsupported models. u Mode can also be switched with the following escape sequence. (Undocumented) ----------+----------------------------- Escape sequence|Mode ----------+----------------------------- ESC+"[?3h" |25 lines of space ESC+"[?3l" |20/25 lines ----------+----------------------------- o When in 25 lines of space mode, you cannot switch to 20 lines mode by entering [CTRL]+[f・6] from the keyboard or using the escape sequence ESC+"[>3h". o On PC-98GS and PC-9821 (excluding Bp, Bs, Be, Bf, and Ts), if 25-line space mode is specified, the horizontal scan frequency is set to 31.47 kHz. If 20/25-line mode is specified, it is always set to 24.83 kHz (even if the horizontal scan frequency at startup is 31.47 kHz). o On PC-H98, this is only effective in normal mode (horizontal scan frequency 31.47 kHz) when using a dedicated display. On PC-H98 high-resolution mode and PC-H98S model8, this function cannot be used to switch to 25-line space. However, the screen is cleared when AX=0010h. Nothing happens with AX=0011h. Related 0060:05D8h INT 18h - Function 2Ah INT 18h - Function 30h INT DCh - Function 14h Subfunction 8010h INT DCh - Function 14h Subfunction 8000h Category Extended MS-DOS Name Get extended attribute mode Undocumented Applicable MS-DOS 3.3D:IO.SYS MS-DOS 5.0, 5.0A:IO.SYS PC-H98 (normal/high-res) Input CL=14h AX=8000h Output AX=mode setting status 0001h: PC (compatible) mode 0000h: EGH mode Explanation o Gets the setting status of the extended attribute set by INT DCh - Function 14h Subfunction 0000h,0001h. Does nothing on models other than the PC-H98. u Notifies the result of status acquisition with INT 18h - Function 2Bh, not from the MS-DOS work area. Related 0060:05D6h INT DCh - Function 14h Subfunction 0000h,0001h INT 18h - Function 2Bh INT DCh - Function 14h Subfunction 8010h Category Extended MS-DOS Name Get text mode Undocumented Applicable to MS-DOS 5.0, 5.0A:IO.SYS PC-H98 (normal), PC-98GS, PC-9821 (excluding Bp, Bs, Be, Bf, Ts) Input CL=14h AX=8010h Output AX=mode setting status 0001h: 20/25 lines 0000h: 25 lines of space between lines Explanation o Gets the text mode setting status set by INT DCh - Function 14h Subfunction 0010h,0011h. MS-DOS 5.0 only supports PC-H98. MS-DOS 5.0A and later supports PC-H98, PC-98GS, and PC-9821 (excluding Bp, Bs, Be, Bf, and Ts). Does nothing on unsupported models. u Notifies the result of status acquisition by INT 18h - Function 2Bh, not from the MS-DOS work area. Related 0060:05D8h INT DCh - Function 14h Subfunction 0010h,0011h INT 18h - Function 2Bh INT 18h - Function 31h INT DCh - Function 14h Subfunction 0000h (LT/HA) Classification Extended MS-DOS Name Save top line of screen and display characters Undocumented Target MS-DOS 3.1 (PC-98LT/HA): IO.SYS Input CL=14h AX=0000h ES:BX=First address of string (end of string with '$') Output No change in register Explanation o Saves characters on top line of screen and clears the entire line. Displays specified string in reverse on top line. Used to display "Insert the disk corresponding to drive A: (B:) and press the appropriate key." o Function only for PC-98LT/HA. Related INT DCh - Function 12h (LT/HA) INT DCh - Function 14h Subfunction 0001h (LT/HA) INT DCh - Function 14h Subfunction 0001h (LT/HA) Classification Extended MS-DOS Name Return top line of screen Undocumented Target MS-DOS 3.1 (PC-98LT/HA): IO.SYS Input CL=14h AX=0001h Output No change in register Explanation o INT DCh - Function 14h Returns the characters on the top line of the screen that were saved with Subfunction 0000h. However, if no characters were saved with Subfunction 0000h, or if this function is executed again after characters have been saved with this function, nothing will be done. o Function only for PC-98LT/HA. Related INT DCh - Function 14h Subfunction 0000h (LT/HA) INT DCh - Function 15h Subfunction 0000h Classification Extended MS-DOS Name Get internal revision number Undocumented Target MS-DOS 5.0, 5.0A: IO.SYS Input CL=15h AX=0000h Output AH=00h AL=Internal revision number Explanation o Returns the internal revision number to the AL register. The internal revision number is assigned to the first version shipped of a product as 01h. Each time an internal change is made, a successively larger number is assigned. As a rule, the internal revision number returns to 01h each time the product number obtained with INT DCh - Function 12h is updated, but in MS-DOS 5.0A-H, there are products whose product numbers change along with the internal revision number. See the table [MS-DOS version - product number - internal revision number correspondence]. o INT DCh - Function 15h only has Subfunction 0000h. Does nothing except AX=0000h. Related 0060:0022h INT DCh - Function 12h INT DCh - Function 73h Classification Extended MS-DOS Name Get MS-DOS drive name - DA/UA matching list Undocumented Target MS-DOS 3.1 (PC-98HA): IO.SYS Input CL=73h AX=0000h DS:DX=List output buffer (buffer size 20h bytes) Output AX=Return code 0000h: Normal termination FFFFh: Called with AX≠0000h Explanation o Writes a list showing which disk device the MS-DOS drive is assigned to into the memory specified by DS:DX. u As a rule, information on the block device built into IO.SYS is written. Information on drives added by device drivers cannot be obtained. As an exception, the information on the RAMDISK.SYS included with MS-DOS can be obtained with this function. o Function only for PC-98HA. Table DA/UA list output buffer structure -------+--------------- -------+--------------- Offset | Contents Offset | Contents -------+--------------- -------+--------------- +00h | A:Attribute +10h | I:Attribute +01h | A:DA/UA +11h | I:DA/UA +02h | B:Attribute +12h | J:Attribute +03h | B:DA/UA +13h | J:DA/UA +04h | C:Attribute +14h | K:Attribute +05h | C:DA/UA +15h | K:DA/UA +06h | D:Attribute +16h | L:Attribute +07h | D:DA/UA +17h | L:DA/UA +08h | E:Attribute +18h | M:Attribute +09h | E:DA/UA +19h | M:DA/UA +0Ah | F:Attribute +1Ah | N:Attribute +0Bh | F:DA/UA +1Bh | N:DA/UA +0Ch | G:Attribute +1Ch | O:Attribute +0Dh | G:DA/UA +1Dh | O:DA/UA +0Eh | H:Attribute +1Eh | P:Attribute +0Fh | H:DA/UA +1Fh | P:DA/UA -------+--------------- -------+--------------- * As a rule, DA/UA values are not set for block devices added in CONFIG.SYS. However, RAM DISK (RAMDISK.SYS) is an exception. [DA/UA Meaning] -------+------------------------------------------- DA/UA | Device Type -------+------------------------------------------- 00h | No drive (if there are no subsequent drives) 70-71h | FDD, RAM drive D0h | ROM drive D1h | JEIDA memory card drive E0h | RAMDISK (RAMDISK.SYS) E1h | BP RAM DISK (BPRAM.SYS) FFh | No drive (if there are subsequent drives) -------+------------------------------------------- * To access a drive with DA/UA=D0h via BIOS, use INT 1Fh - Function 94h, 95h. * To access a drive with DA/UA=D1h via BIOS, use INT 1Fh - Function B4-B8h. * When accessing a RAMDISK with DA/UA=E0h using the BIOS, use INT 1Bh - Function 05h,06h (RAMDISK). [Attribute Meaning] ------+------------------------------------------- Value |Meaning ------+------------------------------------------- 00h | FDD, ROM drive, RAMDISK, BP RAM DISK 01h | FDD (When two logical drives are assigned to one physical drive) 02h | RAM drive ------+------------------------------------------- Related 0060:0038h 0060:006C-007Bh 0000:0488h INT DCh - Function 74h Classification Extended MS-DOS Name Specifying and getting BP RAM access status Undocumented Target MS-DOS 3.1 (PC-98HA): IO.SYS Input CL=74h AX=Function specification 0000h: BP RAM inaccessible 0001h: BP RAM accessible 8000h: Get BP RAM access status Output AX=Return code 0000h: BP RAM inaccessible 0001h: BP RAM accessible FFFFh: Executed with a value other than AX=0000h,0001h,8000h Explanation o Sets whether to enable access to the RAM disk provided by BPRAM.SYS (a RAM disk driver that uses BPRAM). BP RAM is a non-volatile memory backed up by a lithium battery built into the PC-98HA. o If you set BP RAM inaccessible, you will not be able to read or write to the drive created by BPRAM.SYS. When BP RAM access is enabled, the drive created by BPRAM.SYS can be used like a normal RAM disk drive. o The BP RAM drive is used to store scheduler data. Normally, it is set to a state where BP RAM access is disabled, so it is not visible to the user as a drive. o This function is only available on PC-98HA. Related 0060:0046h INT DCh - Function 80h Subfunction 0000h Classification Extended MS-DOS Name Get number of disk partitions, etc. Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 80h AX = 0000h DS:DX = Buffer address (buffer size 100h bytes) Output No change in register Explanation o Writes a list showing the number of active partitions of the connected hard disk, the first physical sector number of each partition, etc., to the memory specified by DS:DX. u The main processing is as follows. Clears the 100h byte from DS:DX to 0 and copies data from each part of the IO.SYS work area (depending on the DOS version). o PS98-011 does not support SCSI connected devices. SASI HD #2 and #3 only support PC-H98. Related 0060:00ACh 0060:1A50h 0060:1B50h 0060:1D29h 0060:1DA9h 0060:2A88h 0060:2B48h Table Buffer structure -------+------------------------------------------------------------ Offset | Contents -------+------------------------------------------------------------ +00h | SASI/IDE HD #0 active partitions +01h | SASI/IDE HD #1 active partitions +02h | ESDI HD #2 active partitions +03h | SASI HD #3 active partitions +04h | SCSI HD/MO #0 active partitions +05h | SCSI HD/MO #1 active partitions +06h | SCSI HD/MO #2 active partitions +07h | SCSI HD/MO #3 active partitions +08h | Number of active partitions on SCSI HD/MO #4 +09h | Number of active partitions on SCSI HD/MO #5 +0Ah | Number of active partitions on SCSI HD/MO #6 +0Bh | 00 (unused) -------+------------------------------------------------------------ * Number of active MS-DOS partitions on extended formatted hard disks or MOs. * Always 1 for 3.5" MO, always 4 for 5" MO. Buffer structure (continued) -------+------------------------------------------------------------ Offset | Contents -------+------------------------------------------------------------ +0Ch | Number of 1MB FD logical drives +0Dh | Number of 640KB FD logical drives +0Eh | Number of SASI HD logical drives +0Fh | Number of SCSI HD logical drives -------+------------------------------------------------------------ * The number of logical drives on 3.5" MO and 5" MO is not included in the number of SCSI HD logical drives. * If there is only one FDD and two logical drives are assigned to it, the number of logical drives will be two. Buffer structure (continued) --------+----------------------------------------------------------- Offset |Contents --------+----------------------------------------------------------- +10-13h | SASI HD #0 First physical sector number of active partition 1 +14-17h | SASI HD #0 First physical sector number of active partition 2 +18-1Bh | SASI HD #0 First physical sector number of active partition 3 +1C-1Fh | SASI HD #0 First physical sector number of active partition 4 +20-2Fh | SASI HD #1 First physical sector number of active partitions 1-4 +30-3Fh | SASI HD #2 First physical sector number of active partitions 1-4 +40-4Fh | SASI HD #3 First physical sector number of active partitions 1-4 +50-5Fh | SCSI HD/MO #0 First physical sector number of active partitions 1-4 +60-5Fh | SCSI HD/MO #1 First physical sector number of active partitions 1-4 +70-7Fh | SCSI HD/MO #2 First physical sector number of active partitions 1-4 +80-8Fh | SCSI HD/MO #3 First physical sector number of active partitions 1-4 +90-9Fh | SCSI HD/MO #4 First physical sector number of active partitions 1-4 +A0-AFh | SCSI HD/MO #5 First physical sector number of active partitions 1-4 +B0-BFh | SCSI HD/MO #6 First physical sector number of active partitions 1-4 +C0-CFh | 00(unused) +D0-FFh | 00(unused) --------+----------------------------------------------------------- * The first physical sector number of 3.5" MO is always 0. INT DCh - Function 80h Subfunction 0001h Classification Extended MS-DOS Name Unknown Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL = 80h AX = 0001h DS:DX = buffer address (buffer size 100h bytes) Output No change in register Explanation o Writes the screen and keyboard control related parts of the IO.SYS work area to the memory specified by DS:DX. u The main processing is as follows. Clears the 100h byte from DS:DX to 0 and copies 0060:0106-011Fh (1Ah byte) to DS:DX. However, since the work area at 0060:011Fh is a WORD in size, this function only copies the lower 8 bits. Related 0060:0106-011Fh Table Information stored in the buffer (see 0060:0106-011Fh for details) -------+-------+--------------------------------------------------- Offset | Width | Contents -------+-------+--------------------------------------------------- +00h | BYTE | Special input mode +01h | BYTE | [CTRL]+[P]・[N] mode +02h | BYTE | Unused (DOS 5.0A) +03h | BYTE | Work area for hexadecimal conversion in special input mode +04h | WORD | Offset of subroutine used in special input mode +06h | BYTE | [CTRL]+function key mode +07h | BYTE | Unused (DOS 5.0A) +08h | BYTE | Unused (DOS 5.0A) +09h | BYTE | Unused (DOS 5.0A) +0Ah | BYTE | Y coordinate of cursor position +0Bh | BYTE | Function display status flag +0Ch | BYTE | Lower limit of scroll range +0Dh | BYTE | Number of screen lines +0Eh | BYTE | Erasing attribute +0Fh | BYTE | Kanji upper byte storage flag +10h | BYTE | Work area for storing upper byte of kanji +11h | BYTE | Line wrapping mode +12h | BYTE | Scrolling speed +13h | BYTE | Erasing character +14h | BYTE | Unused (DOS 5.0A) +15h | BYTE | Cursor display status flag +16h | BYTE | X coordinate of cursor position +17h | BYTE | Display attribute +18h | BYTE | Upper limit of scroll range +19h | WORD | Weight value when scrolling (This function copies only the lower byte of this work area) -------+-------+--------------------------------------------------- INT DCh - Function 80h Subfunction 8000h Classification Extended MS-DOS Name Presence or absence of BRANCH 4670 virtual drive Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=80h AX=8000h Output AL=Presence or absence of BRANCH 4670 virtual drive 00h: No Other than 00h: Present Explanation o Returns the presence or absence of BRANCH 4670 virtual drive. The BRANCH 4670 virtual drive is incorporated as four MS-DOS logical drives. Related 0060:19FBh INT DCh - Function 80h Subfunction 8001h Category Extended MS-DOS Name Unknown Undocumented Applicable to MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=80h AX=8001h Output AL=0060:27D2h Explanation o Put the value 0060:27D2h in the AL register and return. Related INT DCh - Function 80h Subfunction 8002h Classification Extended MS-DOS Name Installation status of Japanese input FEP included with MS-DOS Undocumented Target MS-DOS 3.1 (PS98-011): IO.SYS MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=80h AX=8002h Output AL=Installation status of Japanese input FEP included with MS-DOS 00h: Not installed 01h: Installed Explanation o Returns the installation status of Japanese input FEP included with MS-DOS. Related 0060:1E50h INT DCh - Function 81h Subfunction 0000h Classification Extended MS-DOS Name Get the installed protected memory capacity Undocumented Target MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=81h AX=0000h Output AL=Installed protected memory capacity (128KB units) Explanation o Returns the capacity of the protected memory installed at addresses 100000h (1MB) to FFFFFFh (16MB - 1). When MS-DOS starts up, it saves the protected memory capacity in the IO.SYS work area (0060:0031h). This function reads it and returns it. For example, if 1MB of protected memory is installed, 08h is returned. o INT DCh - Function 81h Even if memory is acquired with Subfunction 0001h, the value obtained by this function will not change. Related 0060:0031h INT DCh - Function 81h Subfunction 0001h Classification Extended MS-DOS Name Request to allocate protected memory Undocumented Target MS-DOS 3.3 (all): IO.SYS MS-DOS 5.0, 5.0A: IO.SYS Input CL=81h AX=0001h * If AX≠0000h, anything is fine BX=Amount of protected memory to be allocated (in 128KB units) Output AX=0000h Allocation complete BX=Start address of allocated memory (in 64KB units) Returned value is 10h (address 100000h) or more DX=End address of allocated memory (in 64KB units) AX=0001h No protected memory of the specified capacity is available BX=Maximum amount of memory that can be allocated (in 128KB units) AX=FFFFh Protected memory is not implemented Explanation o Protected memory is allocated to the application. Memory is allocated in order from the highest addresses. When memory is acquired, the value of 0000:0401h (BYTE) is decremented. u There is no function to release memory once it has been acquired. Related 0000:0401h INT DCh - Function 82h Subfunction 0000h Classification Extended MS-DOS Name Get available protected memory capacity and address range Undocumented Target MS-DOS 3.3B,C,D (PS98-017・019・1002):IO.SYS MS-DOS 5.0, 5.0A:IO.SYS Input CL=82h AX=0000h Output AX=unused protected memory capacity (128KB units) * In normal mode, the value 0000:0401h is returned * In high-resolution mode, the value 0000:0401h-2 is returned (0 if 0000:0401h<2) BX=minimum address of unused protected memory area (64KB units) * In normal mode, 10h (=100000h) is always returned. * In high-resolution mode, 14h (=140000h) is always returned. DX=Maximum address of unused protected memory area + 1 (64KB units) * The value 0000:0401h*2+10h is returned. Explanation o Returns the unused protected memory capacity implemented in addresses 100000h (1MB) to FFFFFFh (16MB - 1) and the range of those addresses. Use 0000:0401h to manage unused protected memory capacity. o For example, if there is 1MB of unused protected memory, it will look like this. In normal mode, AX=08h (08h*128K=1MB), BX=10h (minimum address = 100000h), DX=20h (maximum address = 200000h-1) are returned. In high-resolution mode, AX=06h (06h*128K=768KB), BX=14h (minimum address = 140000h), DX=20h (maximum address +1 = 200000h) are returned. u In MS-DOS 3.3B and C, 0000:0401h is referenced in words. For this reason, it may not work properly in some situations. This has been fixed in MS-DOS 3.3D and later. o If executed with anything other than AX=0000h, it will return AX=FFFFh without doing anything. Related 0000:0401h